FunctionUtils (CreateJS) Class
[CreateJS only] Designed to provide utility related to functions and polyfills
Item Index
Methods
- bind static
- cancelAnimationFrame static
- requestAnimationFrame static
Methods
bind
(
Function
static
-
that
Add the bind functionality to the Function prototype this allows passing a reference in the function callback
var callback = function(){};
cloudkid.MediaLoader.instance.load('something.json', callback.bind(this));
Parameters:
-
that
FunctionThe reference to the function
Returns:
Function:
The bound function
cancelAnimationFrame
()
static
A polyfill for cancelAnimationFrame, this also gets assigned to the window if it doesn't exist
requestAnimationFrame
()
static
A polyfill for requestAnimationFrame, this also gets assigned to the window if it doesn't exist also window.requestAnimFrame is a redundant and short way to access this property